package dbUtils

import (
	"context"
	"gitee.com/lv_baobao/gcore/helper"
)

type IQueryable2 interface {
	From(tableName string) IQueryable2
	Take(size int32) IQueryable2
	WhereIf(condition string, arg interface{}, condtion bool) IQueryable2
	Where(condition string, arg interface{}) IQueryable2
	WhereIn(fieldName string, args []interface{}, condition bool) IQueryable2

	In(fieldName string, args ...interface{}) IQueryable2
	Order(orderField string) IQueryable2
	OrderByDesc(orderField string) IQueryable2
	Page(pageIndex int, pageSize int, beansPtr interface{}, ctx context.Context) *helper.QueryResult
	List(beansPtr interface{}, ctx context.Context)
	FirstOrDefault(beanPtr interface{}, ctx context.Context)
	Delete(ctx context.Context) int64
	Count(ctx context.Context) int64
	Set(field string, arg interface{}) IQueryable2
	Update(ctx context.Context) bool
	GetWhereMap() map[string]interface{}
	SelectFields(fields string) IQueryable2
}
